package sfy.md.behavior.iterator;

public class Client {
    public static void main(String[] args){
        Container<People> container = new Container();
        People people = new People("sfy");
        People people1 = new People("sfy2");
        People people2 = new People("sfy3");
        container.add(people);
        container.add(people1);
        container.add(people2);
        InteratorManger<People> interatorManger = container.getInterator();
        while (interatorManger.hasNext()){

           System.out.println("用户姓名:"+interatorManger.next().getName());
        }

    }
}
